import { ref } from 'vue';
import axios from 'axios';

export default function getBeauty(){
    // 创建一个值用来保存图片的src路径
const imgUrl = ref('');

const getBeautyImg = async () => {
  const result = await axios.get(
    `https://v.api.aa1.cn/api/pc-girl_bz/index.php?wpon=json`
  );
  imgUrl.value = result.data.img;
};
return {imgUrl,getBeautyImg}
}